
/*
CParticleManager.cpp
Particle Manager element

*/
#include "ParticleManager.h"
//#include "Emitter.h"

CParticleManager::CParticleManager(void)
{

}


CParticleManager::~CParticleManager(void)
{
}
void CParticleManager::LoadEmitter(void) // need to add verison that allows me to swap what files I am loading in.
{

	CEmitter bob;
	CEmitter fred;

	Emitters.push_back(bob.LoadParticle("myXmFile.xml"));//,t1));
	Emitters.push_back(fred.LoadParticle("Particle2.xml"));//,t2));
}

void  CParticleManager::Update( float fElapsedTime )
{
	for(unsigned int x=0; x<Emitters.size();x++)
	{
		Emitters[x]->Update(fElapsedTime);

	}
}
void  CParticleManager::Render( void )
{
		for(unsigned int x=0; x<Emitters.size();x++)
	{
		Emitters[x]->Render();

	}
}
void CParticleManager::AddEmitter(const char* szFileName)
{
	CEmitter temp;
	Emitters.push_back(temp.LoadParticle(szFileName));

}